use GSEA::Pvalue::PvalueCalculator;
use GSEA::Pvalue::Chrono;


for(my $i = 0 ; $i< 10 ; $i++)
{
	


my $Nhit  = int( rand(2000) );
my $Nmiss = int( rand(2000) );
my $score = rand();

print("\n\n*****************************************************\n\nhit=$Nhit, miss=$Nmiss, score=$score ");
print("\n");

my $chrono = GSEA::Pvalue::Chrono->constrChrono();

my $pvc =  GSEA::Pvalue::PvalueCalculator->constrPvalueCalculator( $Nhit, $Nmiss, $score );
my $pvalue1 = $pvc->compute();

print( "\npvalue=" . $pvalue1 );
my $a = $chrono->tickSec() ;
print( "\ntime = " . $a . " secondes" );


# C:\Dev-Cpp\[ projets ]\Pvalue
print("\n\n");
system("\"C:\\Dev-Cpp\\[ projets ]\\Pvalue\\Pvalue.exe\" $Nhit $Nmiss $score 5 ");

my $b = $chrono->tickSec() ;
print( "\ntime = " . $b . " secondes" );

if( $a != 0 )
{
my $diff = abs($a-$b) / $a ;
print("\n\n =>>". ($diff) );
}
}